using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataModels.Models
{
    [Table("QueryTypes")]
    public partial class QueryType
    {
        /// <summary>
        /// View
        /// </summary>
        public const int VIEW = 1;

        /// <summary>
        /// Function
        /// </summary>
        public const int FUNCTION = 2;

        /// <summary>
        /// Stored Procedure
        /// </summary>
        public const int STORED_PROCEDURE = 3;

        /// <summary>
        /// Parameterized View
        /// </summary>
        public const int PARAMETERIZED_VIEW = 4;

        public QueryType()
        {
            this.Queries = new List<Query>();
        }

        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public int QueryTypeId { get; set; }

        [StringLength(1000)]
        public string Name { get; set; }

        [StringLength(1000)]
        public string Description { get; set; }
        public virtual List<Query> Queries { get; set; }
    }
}
